package com.verisette.ncos.service.master.bizunit;

import java.util.List;

import org.apache.log4j.Logger;

import org.corp.agi.common.exception.ProcessException;
import org.corp.agi.service.bean.ProcessContext;
import org.corp.agi.service.bizunit.CommonBusinessUnit;
import com.verisette.ncos.persistence.domain.LogResultMasterCustomer;

public class ViewAuditLogBU extends CommonBusinessUnit {

	private Logger logger = Logger.getLogger(ViewAuditLogBU.class);
	
	@Override
	public void execute(ProcessContext processContext) throws ProcessException {
		if(logger.isInfoEnabled()) logger.info( this.getClass().getSimpleName() + ": execute" );
	
		String qsMatchSetId = (String)processContext.getValueObject();
		List<LogResultMasterCustomer> auditLogList = null;
		LogResultMasterCustomer criterea = new LogResultMasterCustomer();
		
		criterea.setQsMatchSetID(qsMatchSetId);
		
		logger.debug("1.Inquiry Audit Log in LOG_AUDIT_LOG.");
		logger.debug("--> qsMatchSetId : " + qsMatchSetId);
		
		auditLogList = (List<LogResultMasterCustomer>)commonDAO.findByExample(criterea);
		
		logger.debug("--> result size : " + auditLogList.size());
		
		processContext.setValueObject(auditLogList);
		
	}
	
}
